Gentee Programming Language > Documentation > Libraries Download documentation

Strings

Variables of the str type allow you to work with strings.

  • Operations
  • Methods
  • Methods for working with file names
  • Functions

    Operations

    Operations defined for the variable of str type are listed below. The second column contains possible statements where typename is a variable or an expression of the specified type.
     
    OperationSyntaxReturn typeComments
    []str[i]byteGetting byte i from the string.
    ** struintGet the size of a string.
    =str = strstrCopying data from one string to another.
    +=str += str
    str += byte
    str += sbyte
    str += short
    str += ushort
    str += int
    str += uint
    str += float
    str += long
    str += ulong
    str += double
    strAdding data to the string.
    +str + strstrPutting two strings together and creating a resulting string.
    ==str == struintComparison operations.
    !=str != struint-
    <str < struint-
    >str > struint-
    <=str <= struint-
    >=str >= struint-
    %==str %== struintCase-insensitive comparison operations.
    %!=str %!= struint-
    %<str %< struint-
    %>str %> struint-
    %<=str %<= struint-
    %>=str %>= struint-
    @str @ str
    str @ textfunc(...)
    strAdding another string or the result of a text function to a string.

    Methods

    str.appendData addition
    str.appendchДобавить символ
    str.char2oemConverting from the Windows encoding into the DOS encoding
    str.clearClearing a string
    str.copyCopying
    str.crcCalculating the checksum
    str.delDeleting a substring
    str.eqlenComparison
    str.fillFilling a string
    str.fillspacelFilling with spaces
    str.findchFinding a character
    str.findchfromFinding a character with an offset
    str.findchnumFinding character number i
    str.insertInsertion
    str.islastChecking the final character
    str.linesSplitting into lines
    str.lowerConverting to lowercase
    str.lowersubConverting a substring to lowercase
    str.oem2charConverting from DOS into Windows
    str.printOutput
    str.ptrGet the pointer to data
    str.quoteEnclosing by quotation marks
    str.readReading from a file
    str.repeatRepeating a string
    str.replaceReplacing in a string
    str.replacechReplace a character
    str.reserveReserving space
    str.searchSubstring search
    str.setlenSetting a size
    str.setlenptrDetermining the size
    str.splitSplitting a string
    str.substrGetting a substring
    str.trimTrimming a string
    str.trimrspaceDeleting spaces on the right
    str.trimspaceDeleting spaces on both sides
    str.trimsysDeleting spaces and special characters on both sides
    str.upperConverting to uppercase
    str.uppersubConverting a substring to uppercase
    str.writeWriting to a file
    Initializing the search patternCreating data search pattern
    String searchFind a string in another string

    Methods for working with file names

    str.faddnameAdding a name
    str.fappendslashAdding a slash
    str.fdelslashDeleting the final slash
    str.ffullnameGetting the full name
    str.fgetdirGetting the directory owner's name
    str.fgetdriveGetting the name of a disk
    str.fgetpartsGetting name components
    str.fnameextGetting the name of a file
    str.fsetnameModifying the name of the file
    str.fsetpartsCompounding or modifying the name
    str.fsetextModifying the extension
    str.fsplitGetting the directory and name of a file
    str.fwildcardWildcard check

    Functions

    char2strConverting the code of a character into a string
    hex2strlConverting an integer in the hexadecimal form
    hex2struConverting an integer in the hexadecimal form
    printPrinting


     Copyright © 2004-2006 Gentee Inc. All rights reserved.